package com.woniuxy.student.service.impl;

import com.woniuxy.commons.entity.QuestionAnswer;
import com.woniuxy.commons.entity.QuestionDetail;
import com.woniuxy.commons.entity.User;
import com.woniuxy.commons.entity.wyh.TeacherInfo;
import com.woniuxy.student.dao.QuestionDao;
import com.woniuxy.student.service.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: lishuwei
 * @Date: 2020/7/18
 * @description:
 */
@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    private QuestionDao questionDao;
    @Override
    public List<QuestionAnswer> getQuestionsById(long sid,long tid) {
        return questionDao.getQuestionsById(sid,tid);
    }

    @Override
    public QuestionAnswer getQuestionByQAId(long qaid) {
        return questionDao.getQuestionByQAId(qaid);
    }

    @Override
    public List<TeacherInfo> getTeacherByStuid(long i) {
        return questionDao.getTeacherByStuid(i);

    }

    @Override
    public List<QuestionDetail> getDetailsByQaid(int qaid) {
        return questionDao.getDetails(qaid);
    }

    @Override
    public Integer addDetail(QuestionDetail detail) {
        return questionDao.addDetail(detail);
    }
}
